package com.galaxy.user.domain.convert;

import com.galaxy.user.domain.UserBase;
import com.galaxy.user.domain.bo.UserBaseBo;
import com.galaxy.user.domain.vo.UserBaseVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring") // Use Spring component model for dependency injection
public interface UserBaseConvert {

    UserBaseConvert INSTANCE = Mappers.getMapper(UserBaseConvert.class);

    /**
     * 将 BO 转换为实体对象
     */
    UserBase convert(UserBaseBo bo);

    /**
     * 将实体对象转换为 VO
     */
    UserBaseVo convertVo(UserBase bean);



    /**
     * 将 VO 转换为实体对象
     */
    UserBase convert(UserBaseVo vo);

    /**
     * 将实体对象列表转换为 VO 列表
     */
    List<UserBaseVo> convertVoList(List<UserBase> list);

    /**
     * 将 BO 转换为 VO
     */
    UserBaseVo convertVo(UserBaseBo bo);
}
